TextView

constructor(context: Context, attrs: AttributeSet)

Constructor for inflating from XML.

Parameters

context

The Context the view is running in.

attrs

The attributes of the XML tag that is inflating the view.


constructor(context: Context, attrs: AttributeSet, defStyle: Int)

Constructor for inflating from XML with a default style.

Parameters

context

The Context the view is running in.

attrs

The attributes of the XML tag that is inflating the view.

defStyle

An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.


constructor(context: Context, module: Module)

Constructs a new TextView programmatically with a Module.

Parameters

context

The Context the view is running in.

module

The Module data that defines the configuration for this text view, including initial text, styling options (color, font, shadow), dimensions, and rendering mode preferences. Must not be null.

Throws

if module is null, as it's essential for configuration.